package com.utils.parsetxt.txt;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.utils.httphelper.HttpUtil;
 
public class TXTParseUtils {
 
    private static final Integer ONE = 1;
 
    public static void main(String[] args) {
        Map<String, Integer> map = new HashMap<String, Integer>();
 
        /* 读取数据 */
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("C:\\Users\\XR-8\\Desktop\\imei2.txt")),
                                                                         "UTF-8"));
            String lineTxt = null;
            while ((lineTxt = br.readLine()) != null) {
            	lineTxt = lineTxt.trim();
            	String url = "https://wcp.taobao.com/adstrack/track.json?action=2&channel=2028&adid=90018736&imeiMd5="+lineTxt+"&callbackUrl=http%3A%2F%2Fbidder.55duanzi.com%2Fbid%2Fstat%2F360adx%2Factivation%2Ftb%3Fadid%3D90018736%26ouradid%3D1000575%26channel%3D2028%26imeiMd5%3D"+lineTxt;
        		System.out.println("tbselfMonitoring click url:"+url);
        		JSONObject result = HttpUtil.getJSON(url);
        		System.out.println("tbselfMonitoring click result:"+result);
            	
            }
            br.close();
        } catch (Exception e) {
            System.err.println("read errors :" + e);
        }
 
    }
}
